<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <input type="text" placeholder="姓名"  v-model="emp.name">
    <input type="text" placeholder="工资" v-model="emp.salary">
    <input type="text" placeholder="工作" v-model="emp.job">

    <input type="button" value="添加" @click="add()">
    <table border="1">
        <caption>员工信息</caption>
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>工资</td>
            <td>工作</td>
            <td>操作</td>
        </tr>
        <tr v-for="(emp,i) in arr">
            <td>{{i+1}}</td>
            <td>{{emp.name}}</td>
            <td>{{emp.salary}}</td>
            <td>{{emp.job}}</td>
            <td><input type="button" value="删除" @click="del(i)"></td>
        </tr>

    </table>

</div>
 <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
     <script>
         let v = new Vue({
             el:"body>div",
             emp:{name:"",salary:"",job:""},
             data:{
                 emp:{name:"",salary:"",job:""},
                 arr:[]
             },
             methods:{
                 add(){
                   v.arr.push({name:v.emp.name,salary:v.emp.salary,job:v.emp.job})
                 },
                 del(i){
                     v.arr.splice(i,1)
                 }

             }

         })
     </script>
</body>
</html>